package com.qf.controller;

import com.qf.service.DtsStatService;
import com.qf.util.ResponseUtil;
import com.qf.vo.StatVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author YDW
 * projectName:shop-manage
 * time:2022/5/23 20:40
 * description:
 */
@RestController
@RequestMapping("/admin/stat")
public class AdminStatController {

    @Autowired
    DtsStatService statService;

    @GetMapping("/user")
    public Object user(){
        StatVo statVo=statService.user();

        return ResponseUtil.ok(statVo);
    }

    @GetMapping("/order")
    public Object order(){
        StatVo statVo=statService.order();

        return ResponseUtil.ok(statVo);
    }
}
